package cn.wzy.service;

import cn.wzy.common.Result;

import java.util.Map;

/**
 * @author nihaowzy
 * @date 2020/12/22 17:08
 */
public interface UserService {

    /**
     * 根据用户名和密码查询用户
     * @param username
     * @param password
     * @return
     * @throws Exception
     */
    Result queryUserByUsernameAndPassword(String username , String password) throws Exception;

    /**
     * 分页查询用户信息
     * @param params
     * @param page
     * @param limit
     * @return
     * @throws Exception
     */
    public Result queryPage(Map<String ,String > params , Integer page , Integer limit) throws Exception;

    /**
     * 根据id重置密码
     * @param id
     * @return
     */
    Result resetPassword(String id) throws Exception;

    /**
     * 将员工状态改为离职状态
     * @param id
     * @return
     * @throws Exception
     */
    Result deleted(String id) throws Exception;

    /**
     * 添加员工
     * @param username
     * @param realname
     * @param role
     * @return
     * @throws Exception
     */
    Result addUser(String username,String realname ,Integer role) throws Exception;


    /**
     * 查询所有客户对于的业务员
     * @return
     * @throws Exception
     */
    Result queryUser() throws Exception;

    /**
     * 修改密码
     * @param id
     * @param newPassword
     * @return
     * @throws Exception
     */
    Result updatePassword(Integer id, String newPassword) throws Exception;

    /**
     * 上传图片业务
     * @param id
     * @param imgUrl
     * @return
     * @throws Exception
     */
    Result upLoadImg(Integer id, String imgUrl) throws Exception;
}
